package fight.view
{
	import flash.display.Sprite;
	
	import morn.core.components.BitmapText;

	public class ControlItem extends Sprite
	{
		public function ControlItem()
		{
			orderBT = new BitmapText();
			addChild(orderBT);
		}
		
		/**
		 * 0-前进 1-包围 2-待机 3-后退
		 */
		public function get index():int
		{
			return _index;
		}
		
		public function set index(value:int):void
		{
			if(value < 0)
			{
				value = 3;
			}
			else if(value > 3)
			{
				value = 0;
			}
			
			orderBT.text = ControlItem.ORDERS[value];
			
			_index = value;
		}
		
		private var orderBT:BitmapText;
		private var _index:int;
		static private const ORDERS:Array = ["前 进","包 围","待 机","后 退"];
	}
}